package expection.Demo01;

public class Test {
    public static void main(String[] args) {
        int a = 2;
        int b = 0;
        //选中想要的代码，CTRL + ALT + T
        if(b == 0){
            throw new ArithmeticException();//主动抛出异常
        }
        try {
            System.out.println(a/b);
        } catch (Exception e) {
//            throw new RuntimeException(e);
            e.printStackTrace();//打印错误的栈信息

        } finally {
        }
    }

}
